package com.mzy.basics.pravatestructure;

/**
 * @author Ives
 * * @date 2021/11/23
 */

/**
 * 单例  私有构造器。 暴力可反射破解
 */
public class Persion {
  public String name;
  private Persion(){};

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public void demo(){
    Persion persion = new Persion();
    persion.setName("小明");
    System.out.println(persion.getName());
  }
}
